<? include("database.php");
if(isset($_REQUEST['Submit']))
{
	$appointment = $_REQUEST['appointment'];
	$appointment1 = $_REQUEST['appointment1'];
		if($appointment1 != "")
		{
			$appoint = $appointment1;
		}else
		{
			$appoint = $appointment;
		}
	
	$customer = $_REQUEST['customer'];
	$customer1 = $_REQUEST['customer1'];
		if($customer1 != "")
		{
			$cust = $customer1;
		}else
		{
			$cust = $customer;
		}
	
	$people = $_REQUEST['people'];
	$people1 = $_REQUEST['people1'];
		if($people1 != "")
		{
			$peop = $people1;
		}else
		{
			$peop = $people;
		}

	$who = $_REQUEST['who'];
	$who1 = $_REQUEST['who1'];
		if($who1 != "")
		{
			$w = $who1;
		}else
		{
			$w = $who;
		}
		
		mysql_query("insert into setup_wizard(appointment, customer, people, who) values('".$appoint."', '".$cust."', '".$peop."', '".$w."')") or die(mysql_error());
		$setup_id = mysql_insert_id();
		header("Location: step2.php?id=$setup_id");

}
?>